package com.dk.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.dk.annotation.EnumValue;
import com.dk.domain.assertion.CheckPointEntity;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 用例实体类
 */
@Data
public class CaseEntity{
    @ExcelProperty("CaseNum(用例编号)")
    @NotNull(message = "CaseNum(用例编号)不能为空")
    @Size(max = 15,message = "CaseNum(用例编号)不得超过15位")
    private String caseNum;

    @ExcelProperty("ApiNum(接口编号)")
    @NotNull(message = "ApiNum(接口编号)不能为空")
    @Size(max = 15,message = "ApiNum(接口编号)不得超过15位")
    private String apiNum;

    @ExcelProperty("CaseName(用例名)")
    @NotNull(message = "CaseName(用例名)不能为空")
    @Size(max = 50,message = "CaseName(用例名)不得超过50位")
    private String caseName;

    @ExcelProperty("Headers(请求头部)")
    private String headers;

    @ExcelProperty("BodyType(请求类型)")
    @NotNull(message = "BodyType(请求类型)不能为空")
    @EnumValue(strValues = {"JSON","PARAMS","XML","FILE"},message = "BodyType(请求类型)不正确(枚举值:JSON,PARAMS,XML,FILE)")
    private String bodyType;

    @ExcelProperty("Body(请求数据)")
    private String body;

    @ExcelProperty("BeforeAction(前置动作)")
    private String beforeAction;

    @ExcelProperty("CheckPoint(检查点)")
    @NotNull(message = "CheckPoint(检查点)不能为空")
    private String checkPoint;

    @ExcelProperty("AfterAction(后置动作)")
    private String AfterAction;
}
